package Game.Players.Units;

/**
 * Created by sech_92 on 17.12.2014.
 */
public class ScoutMachines extends Unit {

    private int armor = 0;
    Weapons[] weapon = {null};

    private ScoutMachines(String _name, int _health, int _armor, TScoutMachines type) {
        name = _name;
        health = _health;
        armor = _armor;
        level = 3;
        squadSize = 1;
        Weapons.makeWeaponz(type, weapon);
    }

    public static ScoutMachines make(TScoutMachines type) {
        ScoutMachines constr;
        switch (type) {
            case Sentinel:
                constr = new ScoutMachines("Sentinel", 700, 10, type);
                break;
            case Chimera:
                constr = new ScoutMachines("Chimera", 700, 10, type);
                break;
            case Trukk:
                constr = new ScoutMachines("Trukk", 700, 10, type);
                break;
            case Rhino:
                constr = new ScoutMachines("Rhino", 700, 10, type);
                break;
            case Viper:
                constr = new ScoutMachines("Viper", 700, 10, type);
                break;
            case Devilfish:
                constr = new ScoutMachines("Devilfish", 700, 10, type);
                break;
            case Wraith:
                constr = new ScoutMachines("Wraith", 700, 10, type);
                break;
            case Land_speeder:
                constr = new ScoutMachines("Land_speeder", 700, 10, type);
                break;

            default:
                constr = new ScoutMachines("", 0, 0, null);
                break;
        }
        return constr;
    }
    public int getArmor(){
        return armor;
    }

    public void decreaseArmor(int a){
        armor -= (a < 0 ? 0 : a);
    }
}
